<template>
    <div>
        <el-table
            :data="tableData"
            stripe
            style="width: 100%"
            :header-cell-style="{background:'#cae4fe',color: '#000'}"
            :cell-style="{border:'none'}"
        >
            <el-table-column
                prop="order"
                label="排序"
                align="center"
            >
            </el-table-column>
            <el-table-column
                prop="name"
                label="中文值"
                align="center"
            >
            </el-table-column>
            <el-table-column
                prop="key"
                label="英文值"
                align="center"
            >
            </el-table-column>
            <el-table-column
                label="操作"
                align="center"
            >
                <template slot-scope="scope">
                    <span class="button-click" @click="handlerEdit(scope.$index,scope.row)" ><img src="../../../images/server02.png"/></span>
                    <span class="button-click" @click="handlerDel(scope.$index,scope.row)" ><img src="../../../images/server04.png"/></span>
                </template>
            </el-table-column>
        </el-table>
        <p style="margin-top: 15px;">
            <el-pagination
                :total="10"
                background
                layout="prev, pager, next"
            >
            </el-pagination>
        </p>
    </div>
</template>

<script>
    import {computedGetSmDictionaryDel} from "../css_js_img/computedSmDictionaryController"
    export default {
        props: [
            "tableData"
        ],
        methods: {
            handlerEdit(index,row){
                this.$emit("edit",row)
            },
            handlerDel(index,row){
                this.$confirm('是否删除?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    computedGetSmDictionaryDel(this,row.id);    //删除具体某条组织信息
                });
            },
            refresh(){
                this.$emit('listSearch');
            }
        },
    }
</script>